package bean;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Auther leiHua
 * @Date 2022/5/8
 * 裁判信息类
 */
public class Referee implements Serializable {
    private static final long serialVersionUID=1L;
    private String r_id;  //裁判id
    private String name; //裁判名字
    private String sex;  //性别
    private int age ;   //年龄

    public Referee() {
    }

    public Referee(String r_id, String name, String sex, int age) {
        this.r_id = r_id;
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getR_id() {
        return r_id;
    }

    public void setR_id(String r_id) {
        this.r_id = r_id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Referee referee = (Referee) o;
        return age == referee.age && Objects.equals(r_id, referee.r_id) && Objects.equals(name, referee.name) && Objects.equals(sex, referee.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(r_id, name, sex, age);
    }

    @Override
    public String toString() {
        return "Referee{" +
                "r_id='" + r_id + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", age=" + age +
                '}';
    }
}
